﻿
function m_o(tag,kai){
    
    for(var i=1;i<9;i++){
        var obj = document.getElementById("u"+i);
        if(!obj){continue;}
        if(tag == i){
            obj.className = obj.className.replace("g_dn","");
        }
        else{           
            if(obj.className.indexOf("g_dn")<0){
                obj.className = "g_dn";
            }
        }
    }
    
}

//控制页签切换
//me-页签编号,meId页签ID，son子签编号，sonId子签ID，count有多少个页签
function m_tab(me,meId,son,sonId,count){
    for(var i=1;i<=count;i++){
        var obj = document.getElementById(meId+i);   
        var sonObj = document.getElementById(sonId+me+i);     
        if(son==i){
            obj.className = "cur";
            sonObj.className = sonObj.className.replace("g_dn","");
        }else{
            obj.className = "";
            if(sonObj.className.indexOf("g_dn")<0){
                sonObj.className = sonObj.className+" g_dn";
            }
        }
        
    }
}

//获取选中的下拉框项的值
function getselectValue(el) {
    var ID = "";
    var eOptions = el.options;
    for (i = 0; i < eOptions.length; i++) {
        var op = eOptions[i];
        if (op.selected) {
            ID = op.value;
        }
    }

    return ID;
}